#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

#define NOISY_TEST 1

int main()
{
        struct gameState state;
        int numPlayer = 2;
        int p, r, i, test, handPos, choice1, choice2, choice3, bonus;
        int seed = 1000;
        int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

        memset(&state, 23, sizeof(struct gameState));
        r = initializeGame(numPlayer, k, seed, &state);

        handPos = 2;
        printf("Testing Smithy\n");

#if (NOISY_TEST == 1)
    printf("Number of cards should before smithy  %d\n", numHandCards(&state));
#endif
        test = numHandCards(&state) +2;
#if (NOISY_TEST == 1)
    printf("Number of cards after smithy should be %d\n", test);
#endif
        cardEffect(k[6], choice1, choice2, choice3, &state, handPos, &bonus);
        p = numHandCards(&state);
        assert(test == p);
#if (NOISY_TEST == 1)
    printf("Number of cards after smithy is %d\n", p);
#endif

        printf("All tests passed\n");
}
